﻿using System;
using BIS.Portal.Core.Base;
using System.Collections.Generic;
using BIS.Portal.Core.Global;

namespace BIS.Portal.Modules.CMS.Adm
{
    public partial class AdminCmsArticleUpdateControl_Settings : ControlSettingBase
    {

        protected void Page_Load(object sender, EventArgs e)
        {
            LoadSetting();
        }

        private void LoadSetting()
        {
            string pageName = GetControlSetting<string>(
                ModuleSettingNames.AdminCmsArticleUpdateControl.AdminCmsArticleUpdate_ContentPage,
                PortalContext.LanguageAlias);
            AdminPageAliasManagement.BindPageList(pageName, ddlPageChoice);

            txtFtpPath.Text = GetControlSetting<string>(
                ModuleSettingNames.AdminCmsArticleUpdateControl.AdminCmsArticleUpdate_UrlPopFileManagement,
                PortalContext.LanguageAlias
                );
        }
        public override void SaveSettings(Dictionary<string, string> settings)
        {
            SetControlSettingForAllLanguages(ddlPageChoice.ID, ModuleSettingNames.AdminCmsArticleUpdateControl.AdminCmsArticleUpdate_ContentPage,settings);
            SetControlSettingForAllLanguages(txtFtpPath.ID, ModuleSettingNames.AdminCmsArticleUpdateControl.AdminCmsArticleUpdate_UrlPopFileManagement, settings);
        }     
    }
}